/* Moderator	: helpbygrace ( helpbygrace_AT_gmail.com) */
/**********************************************************
  theCore Instruction Set Simulator
  Main함수를 담고 있다.
  ********************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>

#include "proc.h"
#include "mem.h"
#include "common.h"

int main(int argc, char * argv[])
{
  /*
  proc_t	*proc = (proc_t*)malloc(sizeof(proc_t));
  mem_t		*mem	= (mem_t*)malloc(sizeof(mem_t));

  word		tmp0 = 0,tmp1 = 258, tmp2 = 0;
  int		result;

  init_proc(proc);
  init_mem(mem,1024);
  */

  /*
  if(op_mem(proc, mem, 0x8000, st_word, 1234, NULL) != SUCCESS)
    return FAIL;
  if(op_mem(proc, mem, 0x8000, ld_word, 0, &tmp0) != SUCCESS)
    return FAIL;
  fprintf(stdout,"mem_capacity : %d\n",mem->capacity);
  op_mem(proc, mem, 0x890000, ex_word, tmp1, &tmp1);
  op_mem(proc, mem, 0x890000, ld_unsigned_byte, tmp2, &tmp2);
  fprintf(stdout,"mem_capacity : %d\n",mem->capacity);

  fprintf(stdout, "%d\n", tmp0);
  fprintf(stdout, "tmp1 = %d, tmp2 = %d\n",tmp1,tmp2);
  */

  return ciss();
}
